package com.hemi.rhet;

import java.util.LinkedList;

public class Queue {
	private LinkedList<Object> linkedList = new LinkedList<Object>();
	//队尾插
	 public void put(Object o) {
	  linkedList.addLast(o);
	 }
	 // 队头取 取完并删除
	 public Object get() {
	  if (!linkedList.isEmpty())
	   return linkedList.removeFirst();
	  else
	   return "";
	 }
	 public boolean isEmpty() {
	  return linkedList.isEmpty();
	 }
	 public int size() {
	  return linkedList.size();
	 }
	 public void clear() {
	  linkedList.clear();
	 }
	 
	 public static Queue getQueue(){
		 return new Queue();
	 }

}
